<template>
  <div class="used flex bed_info_item">
    <img v-if="isUsed" src="@/assets/img/used-bed.png" />
    <img v-else src="@/assets/img/vacantbed.png" />
    <div class="used_num">
      <p>{{ isUsed ? "已用床位" : "可用床位" }}</p>
      <div class="num">{{ num }} <span>个</span></div>
    </div>
  </div>
</template>

<script setup lang="ts">
defineProps({
  isUsed: {
    type: Boolean,
    default: true,
  },
  num: {
    type: Number,
    default: 0,
  },
});
</script>

<style lang="scss" scoped>
.bed_info_item {
  padding: 1rem 2rem;
  background: url("../assets/img/wounded-total-bg.png");
  background-size: 100% 100%;
  margin: 2rem 0;
  img {
    width: 15rem;
    height: 15rem;
    margin-right: 4rem;
  }
  .used_num {
    p {
      font-size: 3.2rem;
    }
    .num {
      font-family: D-DIN-Bold;
      font-size: 4.8rem;
      color: #5dfcf6;
      span {
        font-size: 3.2rem;
        color: #dfffff;
      }
    }
  }
}
</style>
